usage of stream in test automation